package com.shop.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.shop.dao.OrderDetailDao;
import com.shop.entity.OrderDetail;
import com.shop.service.OrderDetailService;

@Service
@Transactional
public class OrderDetailServiceImpl implements OrderDetailService{
	
	@Autowired
	private OrderDetailDao orderDetailDao ;
	@Override
	public List<OrderDetail> findAllOrder() {
		return orderDetailDao.findAllOrder();
	}

	@Override
	public Serializable addOrderDetail(OrderDetail orderDetail) {
		return orderDetailDao.addOrderDetail(orderDetail);
	}

	@Override
	public Serializable deleteOrderDetail(OrderDetail orderDetail) {
		return orderDetailDao.deleteOrderDetail(orderDetail);
		
	}

	@Override
	public Serializable updateOrderDetail(OrderDetail orderDetail) {
		orderDetailDao.updateOrderDetail(orderDetail);
		return null;
	}

	@Override
	public OrderDetail selectByOrderDetailId(OrderDetail orderDetail) {
		return orderDetailDao.selectByOrderDetailId(orderDetail);
	}

	public OrderDetailDao getOrderDetailDao() {
		return orderDetailDao;
	}

	public void setOrderDetailDao(OrderDetailDao orderDetailDao) {
		this.orderDetailDao = orderDetailDao;
	}
	
	

}
